package com.mibox.common.ui;

import android.content.Intent;

import com.mibox.common.bean.SettingBean;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Map;

public class BroadcastActivity extends BaseEntryActivity {

    @Override
    protected void addPageEntries(LinkedList<SettingBean> entries) {
        HashMap<String, String> broadcastEntry = new LinkedHashMap<>();
        broadcastEntry.put("关机", "smartship.power.off");
        broadcastEntry.put("恢复出厂设置", "qmstar.ptt.doMasterClear");
        for (Map.Entry<String, String> entry : broadcastEntry.entrySet()) {
            entries.add(new SettingBean(entry.getKey(),
                    () -> sendBroadcast(new Intent(entry.getValue()))));
        }
    }
}
